package cn.edu.scau.cmi.wujiaxian.client;

import java.io.IOException;
import java.util.Objects;

import cn.edu.scau.cmi.wujiaxian.comprehension.client.ComprehensionJavafx;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

/**
 * 综合性实验客户端
 *
 */
public class ComprehensiveClient extends Application {
	 @Override
	    public void start(Stage primaryStage) throws IOException {
	        FXMLLoader fxmlLoader = new FXMLLoader();
	        Parent parent = fxmlLoader.load(Objects.requireNonNull(
	        		ComprehensionJavafx.class.getClassLoader().getResourceAsStream(
	                        "cn/edu/scau/cmi/wujiaxian/comprehension/client/comprehensive.fxml")));
	        Scene scene = new Scene(parent);
	        
	        primaryStage.setTitle("综合性实验");
	        primaryStage.setScene(scene);
	        primaryStage.show();
	    }

	    /**
	     * @param args the command line arguments
	     */
	    public static void main(String[] args) {
//	        launch(args);
	        Platform.runLater(new Runnable() {
	            public void run() {             
	                try {
						new ComprehensiveClient().start(new Stage());
					} catch (IOException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}
	            }
	         });
	    }
}
